-- GENERATED SPELL FOR [Timbermaw Totemic] --


function spell0_6186(pUnit, Event) --@Elemental Protection Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(8262,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_6186', 1, 1)
end

function spell1_6186(pUnit, Event) --@Healing Ward,Self--
pUnit:FullCastSpellOnTarget(5605,pUnit)
pUnit:RegisterEvent('Sorts_6186', 32000, 1)
end

function Sorts_6186(pUnit, Event)
local choix_sorts_6186 = math.random(0, 1)
if choix_sorts_6186 == 0 then
pUnit:RegisterEvent('spell0_6186', 1, 1)
end
if choix_sorts_6186 == 1 then
pUnit:RegisterEvent('spell1_6186', 1, 1)
end
end

function mob6186_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6186', math.random(1500, 3000), 1)
end

function mob6186_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6186_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6186_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6186, 1, 'mob6186_Action')
RegisterUnitEvent(6186, 2, 'mob6186_Leave')
RegisterUnitEvent(6186, 3, 'mob6186_Kill')
RegisterUnitEvent(6186, 4, 'mob6186_Die')
